/*    This file is part of libmissive.
 *
 *    libmissive is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU Lesser General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    libmissive is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public License
 *    along with libmissive.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef MISV_BOX_H
#define MISV_BOX_H

#include <epistle/message.h>

#include "crypt.h"

int
msg_box(Msg *msg, const Nonce nonce,
	const Box_skey my_skey, const Box_pkey their_pkey);

int
msg_unbox(Msg *msg, const Nonce nonce,
	  const Box_skey my_skey, const Box_pkey their_pkey);

int
boxinfo_add(Msg *msg, const Nonce nonce, const Box_pkey my_pkey);

int
boxinfo_remove(Msg *msg, Nonce nonce, Box_pkey their_pkey);

int
boxinfo_get(Msg *msg, Nonce nonce, Box_pkey their_pkey);

int
boxinfo_box(Msg *msg, const Nonce nonce, const Box_skey my_skey,
	    const Box_pkey my_pkey, const Box_pkey their_pkey);

int
boxinfo_unbox(Msg *msg, Nonce nonce,
	      const Box_skey my_skey, Box_pkey their_pkey);

#endif
